<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = ['小明', '小红', '小刚', '小丽', '小华', '小美',]
        document.write(arr)
        document.write(`<br>`)
        let random = Math.floor(Math.random() * arr.length)
        document.write(arr[random])
        arr.splice(random, 1)
        document.write(`<br>`)
        document.write(arr)

    </script>
</body>

</html>